import { mapGetters, mapActions } from 'vuex'

export const layoutMixin = {
  computed: {
    ...mapGetters([
      'cachedViews',
      'sidebar',
      'tagsView',
      'visitedViews',
      'theme',
      'fixedHeader',
      'showSettings'
    ])
  },
  methods: {
    ...mapActions([
      'addCachedView',
      'toggleSideBar',
      'setTagsView',
      'setTheme',
      'setFixedHeader',
      'addView',
      'addVisitedView',
      'addCachedView',
      'delView',
      'delVisitedView',
      'delCachedView',
      'delOthersViews',
      'delOthersVisitedViews',
      'delOthersCachedViews',
      'delAllViews',
      'delAllVisitedViews',
      'delAllCachedViews',
      'updateVisitedView'
    ])
  }
}
